<?php
/**
 * Created by PhpStorm.
 * User: idcu
 * Date: 2016/3/8
 * Time: 19:08
 */
namespace Crm\Model;
use IDCU\Model\RelationModel;

class OaUserModel extends RelationModel
{
    protected $_link = array(
        'User' => array(
            'mapping_type'  => self::BELONGS_TO,
            'class_name'    => 'User',
            'mapping_name'  => 'user',
            'foreign_key'   => 'crm_id',
        ),
    );

    public function getUser($where){
        return $this->where($where)->select();
    }
}